package com.contextor.magiccards.services;

import com.contextor.magiccards.dao.GenericDao;
import com.contextor.magiccards.model.Entity;
import com.contextor.magiccards.model.errors.MagicCardsException;

/**
 * User: sergey
 * Date: Mar 15, 2011 3:06:49 PM
 */
public interface BaseEntityService<T extends Entity, D extends GenericDao> {
    T getById(int shardId, Number id);

    T loadById(int shardId, Number id);

    void save(int shardId, T t);

    void remove(int shardId, Number id) throws Exception;

    T exist(int shardId, Number id) throws MagicCardsException;

}

